# -*- coding: utf-8 -*-
from django_filters import rest_framework as filters
from .models import *


class StoreFilter(filters.FilterSet):
    # min_price_sell = filters.NumberFilter(field_name="price_sell", lookup_expr='gte')
    # max_price_sell = filters.NumberFilter(field_name="price_sell", lookup_expr='lte')
    # title = filters.CharFilter(field_name='title',lookup_expr='icontains')  # 区别大小写
    # min_created = filters.DateTimeFilter(field_name='created',lookup_expr='gte')
    # max_created = filters.DateTimeFilter(field_name='created',lookup_expr='lte')

    class Meta:
        model = Store
        exclude = []
        # fields = ['price_sell','min_price_sell', 'max_price_sell', 'title', 'min_created', 'max_created']  # query params
